    $(document).ready(function () {
        let message_is_ok = true;
        let eq_info = false;
        let eq_num = false;
        let eq_data = false;
        let eq_pro = false;
        let eq_intro = false;
        let eq_store_data = false;
        let eq_after_sale = false;
        let eq_phone = false;
        let eq_type = false;

        $("#equipment_information").blur(function () {
            eq_info = true;
            // 在这里编写失去焦点时的操作
            let equipment_information = $(this).val();
            let remind_message = "";
            if (equipment_information.trim() === "") {
                remind_message += "设备名称为空";
                message_is_ok = false;
            } else {
                if (/^[\u4e00-\u9fa5]+$/.test(equipment_information)) {
                    // 设备名称合理
                    message_is_ok = true;
                } else {
                    remind_message += "设备名称不合理";
                    message_is_ok = false;
                }
            }
            $("#equipment_information1").html(remind_message);
        });
        $("#equipment_number").blur(function () {
            eq_num = true;
            // 在这里编写失去焦点时的操作
            let equipment_number = $(this).val();
            let remind_message = "";
            if (equipment_number.trim() === "") {
                remind_message += "编号为空";
                message_is_ok = false;
            } else {
                //  /^\d{1,8}$/
                if (/^\d{1,8}$/.test(equipment_number)) {
                    // 编号格式正确
                    message_is_ok = true;
                } else {
                    remind_message += "编号格式不正确";
                    message_is_ok = false;
                }
            }
            $("#equipment_number1").html(remind_message);
        })
        $("#equipment_type").blur(function () {
            eq_type = true;
            // 在这里编写失去焦点时的操作
            let equipment_type = $(this).val();
            let remind_message = "";
            if (equipment_type.trim() === "请选择") {
                remind_message += "类型为空";
                message_is_ok = false;
            } else {
                // 已选择了类型
                message_is_ok = true;
            }
            $("#equipment_type1").html(remind_message);
        })
        $("#equipment_producer").blur(function () {
            eq_pro = true;
            // 在这里编写失去焦点时的操作
            let equipment_producer = $(this).val();
            let remind_message = "";
            if (equipment_producer.trim() === "") {
                remind_message += "供应商名称为空";
                message_is_ok = false;
            } else {
                if (/^[\u4e00-\u9fa5]+$/.test(equipment_producer)) {
                    // 供应商格式正确
                    message_is_ok = true;
                } else {
                    remind_message += "供应商的名称格式不正确";
                    message_is_ok = false;
                }
            }
            $("#equipment_producer1").html(remind_message);
        })
        $("#equipment_data").blur(function () {
            eq_data = true;
            // 在这里编写失去焦点时的操作
            let equipment_data = $(this).val();
            let remind_message = "";
            if (equipment_data.trim() === "") {
                remind_message += "设备出产日期为空";
                message_is_ok = false;
            } else {
                if (/^\d{4}-\d{2}-\d{2}$/.test(equipment_data)) {
                    // 供应日期格式正确
                    message_is_ok = true;
                } else {
                    remind_message += "日期格式不正确";
                    message_is_ok = false;
                }
            }
            $("#equipment_data1").html(remind_message);
        })
        $("#equipment_store_data").blur(function () {
            eq_store_data = true;
            // 在这里编写失去焦点时的操作
            let equipment_store_data = $(this).val();
            let remind_message = "";
            if (equipment_store_data.trim() === "") {
                remind_message += "质保期为空";
                message_is_ok = false;
            } else {
                if (/^\d+年$/.test(equipment_store_data)) {
                    // 供应日期格式正确
                    message_is_ok = true;
                } else {
                    remind_message += "保质期格式不正确";
                    message_is_ok = false;
                }
            }
            $("#equipment_store_data1").html(remind_message);
        })
        $("#equipment_after_sale").blur(function () {
            eq_after_sale = true;
            // 在这里编写失去焦点时的操作
            let equipment_after_sale = $(this).val();
            let remind_message = "";
            if (equipment_after_sale.trim() === "") {
                remind_message += "售后联系人为空";
                message_is_ok = false;
            } else {
                if (/^[\u4e00-\u9fa5]+$/.test(equipment_after_sale)) {
                    // 售后联系人格式正确
                    message_is_ok = true;
                } else {
                    remind_message += "售后联系人格式不正确";
                    message_is_ok = false;
                }
            }
            $("#equipment_after_sale1").html(remind_message);
        })
        $("#producer_phone_number").blur(function () {
            eq_phone = true;
            // 在这里编写失去焦点时的操作
            let producer_phone_number = $(this).val();
            let remind_message = "";
            if (producer_phone_number.trim() === "") {
                remind_message += "售后联系人联系方式为空";
                message_is_ok = false;
            } else {
                if (/^\d{11}$/.test(producer_phone_number)) {
                    // 售后联系人格式正确
                    message_is_ok = true;
                } else {
                    remind_message += "售后联系人格式不正确";
                    message_is_ok = false;
                }
            }
            $("#producer_phone_number1").html(remind_message);
        })
        $("#equipment_introduction").blur(function () {
            eq_intro = true;
            // 在这里编写失去焦点时的操作
            let equipment_introduction = $(this).val();
            let remind_message = "";
            if (equipment_introduction.trim() === "") {
                remind_message += "质保说明为空";
                message_is_ok = false;
            } else {
                if (equipment_introduction == '在保' || equipment_introduction == '失效') {
                    // 质保格式正确
                    message_is_ok = true;
                } else {
                    remind_message += "质保格式不正确";
                    message_is_ok = false;
                }
            }
            $("#equipment_introduction1").html(remind_message);
        })
        $("#myForm").submit(function (event) {
            if (message_is_ok && eq_phone && eq_intro && eq_data && eq_info
            && eq_num && eq_after_sale && eq_type && eq_store_data && eq_pro)  {
                // 这里就可以提交
            } else {
                event.preventDefault();
                alert("请确认信息正确再点击提交按钮");
                console.log("ok");
            }
        });
    });